//
//  CAnAlgExerData.h
//  sr01sdkProject
//
//  Created by  on 2024/9/3.
//  Activity data during exercise (锻炼期间的活动数据)

#import <Foundation/Foundation.h>
#import "CANalgProtocal.h"


NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(uint8_t, NALG_EXERCISE_TYPE) {
    
    NALG_EXERCISE_OTHER = 0X00, // Other
    NALG_EXERCISE_RUN = 0X01, // Running
    NALG_EXERCISE_WALK = 0X02, // Walking
    NALG_EXERCISE_POOL_SWIMING = 0X03, // Pool Swimming
    NALG_EXERCISE_OPEN_WATER_SWIM = 0X04, // Open Water Swimming
    NALG_EXERCISE_INDOOR_CYCLING = 0X05, // Indoor Cycling
    NALG_EXERCISE_OUTDOOR_CYCLING = 0X06, // Outdoor Cycling
    NALG_EXERCISE_YOGA = 0x07, // Yoga
    NALG_EXERCISE_MINDFUL = 0x08 // minful
};



@interface CAnAlgExerData : NSObject<CANalgProtocal>

@property(assign, nonatomic, readonly)uint8_t cmdByte;

@property(assign, nonatomic, readonly)NSUInteger timeStamp;// Timestamp, accurate to day
@property(assign, nonatomic, readonly)float distance;//The sum of total walking distance and total running distance, unit:km
@property(assign, nonatomic, readonly)uint16_t steps;// The sum of walking and running steps in 5 minutes

@property(assign, nonatomic, readonly)uint8_t speed; // uint:dm/s

@property(assign, nonatomic, readonly)uint16_t wholeEnergyCnsmptn;// Total energy expenditure in 5 minutes, including basal metabolic rate, unit: Kcal
@property(assign, nonatomic, readonly)uint16_t activityEnergyCnsmptn;// Total activity energy expenditure within 5 minutes, excluding basal metabolic rate, unit: Kcal

@property(assign, nonatomic, readonly)uint8_t cadence; //Cadence, exercise cadence, unit: steps/min(步频)

@property(assign, nonatomic, readonly)float met; // Current energy consumption,Unit: MET

@property(assign, nonatomic, readonly)NALG_EXERCISE_TYPE exerType;

@property(assign, nonatomic, readonly)uint8_t heartRate;


- (instancetype)initWithData:(NSData *)data;
-(NSNumber *)dataTimeStamp;
@end

NS_ASSUME_NONNULL_END
